package com.qlogic.commons.platform.impls.lucene.indexer;

import java.io.Serializable;
import java.util.Iterator;
import java.util.Map;

import com.qlogic.commons.exceptions.BaseException;
import com.qlogic.commons.platform.impls.lucene.model.DocumentWrapper;
import com.qlogic.commons.platform.impls.lucene.model.RegistryRegion;

public interface ContentRegistry extends Serializable {
	
	public static final int ADD = 0;
	public static final int DELETE = 1;
	
	public Iterator getRegionNames () throws BaseException;
	public RegistryRegion getRegion (String regionName) throws BaseException;
	
	public void registerForAdd (DocumentWrapper documentWrapper, String indexer) throws BaseException;
	public void registerForAdd (Map documentWrappers, String indexer) throws BaseException;
	public void registerForDelete (String contentId, String indexer) throws BaseException;
	public void registerForDelete (String fieldName, String fieldValue, String indexer) throws BaseException;
	public void registerForUpdate (DocumentWrapper documentWrapper, String indexer) throws BaseException;
	public void unregister (RegistryRegion region, DocumentWrapper documentWrapper) throws BaseException;
	public void flush () throws BaseException;
}
